/**
 * Copyright (c) 2006-2009 by Shanghai UnuTrip Network Technology Development Co.,Ltd
 * All rights reserved.
 */


package com.unusap.remote.core;

import com.unusap.remote.core.authenticate.SPAuthenticateWebService;
import com.unusap.remote.core.authenticate.dto.AuthenticateRequest;
import com.unusap.remote.core.authenticate.dto.AuthenticateResponse;
import com.unusap.remote.core.dto.SimpleResponse;
import com.unusap.remote.core.register.SPRegisterWebService;
import com.unusap.remote.core.register.dto.RegisterRequest;
import com.unusap.remote.core.register.dto.RegisterResponse;
import com.unusap.remote.core.register.dto.RegisterValidateRequest;
import com.unusap.remote.core.userinfo.SPUserInfoModifyWebService;
import com.unusap.remote.core.userinfo.dto.ModifyUserInfoRequest;
import com.unusap.remote.core.communicate.dto.UpdatePasswordRequest;
import com.unusap.remote.core.communicate.SPSSLWebService;

/**
 * 
 * @author danson
 * SPWebServiceDelegate.java
 * 2009-8-19
 */
public class SPWebServiceDelegate implements SPWebService {
	
	private SPRegisterWebService registerWebService;
	
	private SPAuthenticateWebService authenticateWebService;
	
	private SPUserInfoModifyWebService userInfoModifyWebService;

    private SPSSLWebService communicationWebService;

	@Override
	public RegisterResponse register(RegisterRequest registerRequest) {
		return registerWebService.register(registerRequest);
	}

	@Override
	public SimpleResponse registerValidate(RegisterValidateRequest validateRequest) {
		return registerWebService.registerValidate(validateRequest);
	}

    @Override
	public AuthenticateResponse authenticate(AuthenticateRequest authenticateRequest) {
		return authenticateWebService.authenticate(authenticateRequest);
	}

    public SimpleResponse updatePassword(UpdatePasswordRequest updatePasswordRequest) {
        return communicationWebService.updatePassword(updatePasswordRequest);
    }

    @Override
	public SimpleResponse modifyUserInfo(ModifyUserInfoRequest modifyUserInfoRequest) {
		return userInfoModifyWebService.modifyUserInfo(modifyUserInfoRequest);
	}

    public void setRegisterWebService(SPRegisterWebService registerWebService) {
		this.registerWebService = registerWebService;
	}

    public void setAuthenticateWebService(SPAuthenticateWebService authenticateWebService) {
		this.authenticateWebService = authenticateWebService;
	}

    public void setUserInfoModifyWebService(SPUserInfoModifyWebService userInfoModifyWebService) {
		this.userInfoModifyWebService = userInfoModifyWebService;
	}

    public void setCommunicationWebService(SPSSLWebService communicationWebService) {
        this.communicationWebService = communicationWebService;
    }

}
